<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组的方法-every</title>
</head>
<body>
  <script>
    /*
      every: 
        检测数组中所有的 元素是否都满足某个条件，如果都满足，返回true；否则返回false
        特点：找到一个不满足条件的，就不找了，就立即返回最后的结果false
    */
    let nums = [18, 20, 9, 5]
    let r = nums.every(item => {
      console.log('every')
      return item > 10
    })
    console.log(r)



  </script>
</body>
</html>